import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const state = {
    baseUrl:'http://192.168.31.214:1006',
    userInfo:{}
}

const getters = {

}

const mutations = {
    login(state, user) {
        state.userInfo = user
        console.log(state.userInfo);
        localStorage.setItem('userInfo', JSON.stringify(user));
        console.log('-----------登陆成功-----------')
    },

}

const actions = {

}

export default new Vuex.Store({
    state,
    getters,
    mutations,
    actions,
    modules: {

    }
})
